#ifndef BIT_REVERSE_H
#define BIT_REVERSE_H

RT_L1_DATA short bit_rev_radix2_LUT[FFT_LEN] = {
0,
1024,
512,
1536,
256,
1280,
768,
1792,
128,
1152,
640,
1664,
384,
1408,
896,
1920,
64,
1088,
576,
1600,
320,
1344,
832,
1856,
192,
1216,
704,
1728,
448,
1472,
960,
1984,
32,
1056,
544,
1568,
288,
1312,
800,
1824,
160,
1184,
672,
1696,
416,
1440,
928,
1952,
96,
1120,
608,
1632,
352,
1376,
864,
1888,
224,
1248,
736,
1760,
480,
1504,
992,
2016,
16,
1040,
528,
1552,
272,
1296,
784,
1808,
144,
1168,
656,
1680,
400,
1424,
912,
1936,
80,
1104,
592,
1616,
336,
1360,
848,
1872,
208,
1232,
720,
1744,
464,
1488,
976,
2000,
48,
1072,
560,
1584,
304,
1328,
816,
1840,
176,
1200,
688,
1712,
432,
1456,
944,
1968,
112,
1136,
624,
1648,
368,
1392,
880,
1904,
240,
1264,
752,
1776,
496,
1520,
1008,
2032,
8,
1032,
520,
1544,
264,
1288,
776,
1800,
136,
1160,
648,
1672,
392,
1416,
904,
1928,
72,
1096,
584,
1608,
328,
1352,
840,
1864,
200,
1224,
712,
1736,
456,
1480,
968,
1992,
40,
1064,
552,
1576,
296,
1320,
808,
1832,
168,
1192,
680,
1704,
424,
1448,
936,
1960,
104,
1128,
616,
1640,
360,
1384,
872,
1896,
232,
1256,
744,
1768,
488,
1512,
1000,
2024,
24,
1048,
536,
1560,
280,
1304,
792,
1816,
152,
1176,
664,
1688,
408,
1432,
920,
1944,
88,
1112,
600,
1624,
344,
1368,
856,
1880,
216,
1240,
728,
1752,
472,
1496,
984,
2008,
56,
1080,
568,
1592,
312,
1336,
824,
1848,
184,
1208,
696,
1720,
440,
1464,
952,
1976,
120,
1144,
632,
1656,
376,
1400,
888,
1912,
248,
1272,
760,
1784,
504,
1528,
1016,
2040,
4,
1028,
516,
1540,
260,
1284,
772,
1796,
132,
1156,
644,
1668,
388,
1412,
900,
1924,
68,
1092,
580,
1604,
324,
1348,
836,
1860,
196,
1220,
708,
1732,
452,
1476,
964,
1988,
36,
1060,
548,
1572,
292,
1316,
804,
1828,
164,
1188,
676,
1700,
420,
1444,
932,
1956,
100,
1124,
612,
1636,
356,
1380,
868,
1892,
228,
1252,
740,
1764,
484,
1508,
996,
2020,
20,
1044,
532,
1556,
276,
1300,
788,
1812,
148,
1172,
660,
1684,
404,
1428,
916,
1940,
84,
1108,
596,
1620,
340,
1364,
852,
1876,
212,
1236,
724,
1748,
468,
1492,
980,
2004,
52,
1076,
564,
1588,
308,
1332,
820,
1844,
180,
1204,
692,
1716,
436,
1460,
948,
1972,
116,
1140,
628,
1652,
372,
1396,
884,
1908,
244,
1268,
756,
1780,
500,
1524,
1012,
2036,
12,
1036,
524,
1548,
268,
1292,
780,
1804,
140,
1164,
652,
1676,
396,
1420,
908,
1932,
76,
1100,
588,
1612,
332,
1356,
844,
1868,
204,
1228,
716,
1740,
460,
1484,
972,
1996,
44,
1068,
556,
1580,
300,
1324,
812,
1836,
172,
1196,
684,
1708,
428,
1452,
940,
1964,
108,
1132,
620,
1644,
364,
1388,
876,
1900,
236,
1260,
748,
1772,
492,
1516,
1004,
2028,
28,
1052,
540,
1564,
284,
1308,
796,
1820,
156,
1180,
668,
1692,
412,
1436,
924,
1948,
92,
1116,
604,
1628,
348,
1372,
860,
1884,
220,
1244,
732,
1756,
476,
1500,
988,
2012,
60,
1084,
572,
1596,
316,
1340,
828,
1852,
188,
1212,
700,
1724,
444,
1468,
956,
1980,
124,
1148,
636,
1660,
380,
1404,
892,
1916,
252,
1276,
764,
1788,
508,
1532,
1020,
2044,
2,
1026,
514,
1538,
258,
1282,
770,
1794,
130,
1154,
642,
1666,
386,
1410,
898,
1922,
66,
1090,
578,
1602,
322,
1346,
834,
1858,
194,
1218,
706,
1730,
450,
1474,
962,
1986,
34,
1058,
546,
1570,
290,
1314,
802,
1826,
162,
1186,
674,
1698,
418,
1442,
930,
1954,
98,
1122,
610,
1634,
354,
1378,
866,
1890,
226,
1250,
738,
1762,
482,
1506,
994,
2018,
18,
1042,
530,
1554,
274,
1298,
786,
1810,
146,
1170,
658,
1682,
402,
1426,
914,
1938,
82,
1106,
594,
1618,
338,
1362,
850,
1874,
210,
1234,
722,
1746,
466,
1490,
978,
2002,
50,
1074,
562,
1586,
306,
1330,
818,
1842,
178,
1202,
690,
1714,
434,
1458,
946,
1970,
114,
1138,
626,
1650,
370,
1394,
882,
1906,
242,
1266,
754,
1778,
498,
1522,
1010,
2034,
10,
1034,
522,
1546,
266,
1290,
778,
1802,
138,
1162,
650,
1674,
394,
1418,
906,
1930,
74,
1098,
586,
1610,
330,
1354,
842,
1866,
202,
1226,
714,
1738,
458,
1482,
970,
1994,
42,
1066,
554,
1578,
298,
1322,
810,
1834,
170,
1194,
682,
1706,
426,
1450,
938,
1962,
106,
1130,
618,
1642,
362,
1386,
874,
1898,
234,
1258,
746,
1770,
490,
1514,
1002,
2026,
26,
1050,
538,
1562,
282,
1306,
794,
1818,
154,
1178,
666,
1690,
410,
1434,
922,
1946,
90,
1114,
602,
1626,
346,
1370,
858,
1882,
218,
1242,
730,
1754,
474,
1498,
986,
2010,
58,
1082,
570,
1594,
314,
1338,
826,
1850,
186,
1210,
698,
1722,
442,
1466,
954,
1978,
122,
1146,
634,
1658,
378,
1402,
890,
1914,
250,
1274,
762,
1786,
506,
1530,
1018,
2042,
6,
1030,
518,
1542,
262,
1286,
774,
1798,
134,
1158,
646,
1670,
390,
1414,
902,
1926,
70,
1094,
582,
1606,
326,
1350,
838,
1862,
198,
1222,
710,
1734,
454,
1478,
966,
1990,
38,
1062,
550,
1574,
294,
1318,
806,
1830,
166,
1190,
678,
1702,
422,
1446,
934,
1958,
102,
1126,
614,
1638,
358,
1382,
870,
1894,
230,
1254,
742,
1766,
486,
1510,
998,
2022,
22,
1046,
534,
1558,
278,
1302,
790,
1814,
150,
1174,
662,
1686,
406,
1430,
918,
1942,
86,
1110,
598,
1622,
342,
1366,
854,
1878,
214,
1238,
726,
1750,
470,
1494,
982,
2006,
54,
1078,
566,
1590,
310,
1334,
822,
1846,
182,
1206,
694,
1718,
438,
1462,
950,
1974,
118,
1142,
630,
1654,
374,
1398,
886,
1910,
246,
1270,
758,
1782,
502,
1526,
1014,
2038,
14,
1038,
526,
1550,
270,
1294,
782,
1806,
142,
1166,
654,
1678,
398,
1422,
910,
1934,
78,
1102,
590,
1614,
334,
1358,
846,
1870,
206,
1230,
718,
1742,
462,
1486,
974,
1998,
46,
1070,
558,
1582,
302,
1326,
814,
1838,
174,
1198,
686,
1710,
430,
1454,
942,
1966,
110,
1134,
622,
1646,
366,
1390,
878,
1902,
238,
1262,
750,
1774,
494,
1518,
1006,
2030,
30,
1054,
542,
1566,
286,
1310,
798,
1822,
158,
1182,
670,
1694,
414,
1438,
926,
1950,
94,
1118,
606,
1630,
350,
1374,
862,
1886,
222,
1246,
734,
1758,
478,
1502,
990,
2014,
62,
1086,
574,
1598,
318,
1342,
830,
1854,
190,
1214,
702,
1726,
446,
1470,
958,
1982,
126,
1150,
638,
1662,
382,
1406,
894,
1918,
254,
1278,
766,
1790,
510,
1534,
1022,
2046,
1,
1025,
513,
1537,
257,
1281,
769,
1793,
129,
1153,
641,
1665,
385,
1409,
897,
1921,
65,
1089,
577,
1601,
321,
1345,
833,
1857,
193,
1217,
705,
1729,
449,
1473,
961,
1985,
33,
1057,
545,
1569,
289,
1313,
801,
1825,
161,
1185,
673,
1697,
417,
1441,
929,
1953,
97,
1121,
609,
1633,
353,
1377,
865,
1889,
225,
1249,
737,
1761,
481,
1505,
993,
2017,
17,
1041,
529,
1553,
273,
1297,
785,
1809,
145,
1169,
657,
1681,
401,
1425,
913,
1937,
81,
1105,
593,
1617,
337,
1361,
849,
1873,
209,
1233,
721,
1745,
465,
1489,
977,
2001,
49,
1073,
561,
1585,
305,
1329,
817,
1841,
177,
1201,
689,
1713,
433,
1457,
945,
1969,
113,
1137,
625,
1649,
369,
1393,
881,
1905,
241,
1265,
753,
1777,
497,
1521,
1009,
2033,
9,
1033,
521,
1545,
265,
1289,
777,
1801,
137,
1161,
649,
1673,
393,
1417,
905,
1929,
73,
1097,
585,
1609,
329,
1353,
841,
1865,
201,
1225,
713,
1737,
457,
1481,
969,
1993,
41,
1065,
553,
1577,
297,
1321,
809,
1833,
169,
1193,
681,
1705,
425,
1449,
937,
1961,
105,
1129,
617,
1641,
361,
1385,
873,
1897,
233,
1257,
745,
1769,
489,
1513,
1001,
2025,
25,
1049,
537,
1561,
281,
1305,
793,
1817,
153,
1177,
665,
1689,
409,
1433,
921,
1945,
89,
1113,
601,
1625,
345,
1369,
857,
1881,
217,
1241,
729,
1753,
473,
1497,
985,
2009,
57,
1081,
569,
1593,
313,
1337,
825,
1849,
185,
1209,
697,
1721,
441,
1465,
953,
1977,
121,
1145,
633,
1657,
377,
1401,
889,
1913,
249,
1273,
761,
1785,
505,
1529,
1017,
2041,
5,
1029,
517,
1541,
261,
1285,
773,
1797,
133,
1157,
645,
1669,
389,
1413,
901,
1925,
69,
1093,
581,
1605,
325,
1349,
837,
1861,
197,
1221,
709,
1733,
453,
1477,
965,
1989,
37,
1061,
549,
1573,
293,
1317,
805,
1829,
165,
1189,
677,
1701,
421,
1445,
933,
1957,
101,
1125,
613,
1637,
357,
1381,
869,
1893,
229,
1253,
741,
1765,
485,
1509,
997,
2021,
21,
1045,
533,
1557,
277,
1301,
789,
1813,
149,
1173,
661,
1685,
405,
1429,
917,
1941,
85,
1109,
597,
1621,
341,
1365,
853,
1877,
213,
1237,
725,
1749,
469,
1493,
981,
2005,
53,
1077,
565,
1589,
309,
1333,
821,
1845,
181,
1205,
693,
1717,
437,
1461,
949,
1973,
117,
1141,
629,
1653,
373,
1397,
885,
1909,
245,
1269,
757,
1781,
501,
1525,
1013,
2037,
13,
1037,
525,
1549,
269,
1293,
781,
1805,
141,
1165,
653,
1677,
397,
1421,
909,
1933,
77,
1101,
589,
1613,
333,
1357,
845,
1869,
205,
1229,
717,
1741,
461,
1485,
973,
1997,
45,
1069,
557,
1581,
301,
1325,
813,
1837,
173,
1197,
685,
1709,
429,
1453,
941,
1965,
109,
1133,
621,
1645,
365,
1389,
877,
1901,
237,
1261,
749,
1773,
493,
1517,
1005,
2029,
29,
1053,
541,
1565,
285,
1309,
797,
1821,
157,
1181,
669,
1693,
413,
1437,
925,
1949,
93,
1117,
605,
1629,
349,
1373,
861,
1885,
221,
1245,
733,
1757,
477,
1501,
989,
2013,
61,
1085,
573,
1597,
317,
1341,
829,
1853,
189,
1213,
701,
1725,
445,
1469,
957,
1981,
125,
1149,
637,
1661,
381,
1405,
893,
1917,
253,
1277,
765,
1789,
509,
1533,
1021,
2045,
3,
1027,
515,
1539,
259,
1283,
771,
1795,
131,
1155,
643,
1667,
387,
1411,
899,
1923,
67,
1091,
579,
1603,
323,
1347,
835,
1859,
195,
1219,
707,
1731,
451,
1475,
963,
1987,
35,
1059,
547,
1571,
291,
1315,
803,
1827,
163,
1187,
675,
1699,
419,
1443,
931,
1955,
99,
1123,
611,
1635,
355,
1379,
867,
1891,
227,
1251,
739,
1763,
483,
1507,
995,
2019,
19,
1043,
531,
1555,
275,
1299,
787,
1811,
147,
1171,
659,
1683,
403,
1427,
915,
1939,
83,
1107,
595,
1619,
339,
1363,
851,
1875,
211,
1235,
723,
1747,
467,
1491,
979,
2003,
51,
1075,
563,
1587,
307,
1331,
819,
1843,
179,
1203,
691,
1715,
435,
1459,
947,
1971,
115,
1139,
627,
1651,
371,
1395,
883,
1907,
243,
1267,
755,
1779,
499,
1523,
1011,
2035,
11,
1035,
523,
1547,
267,
1291,
779,
1803,
139,
1163,
651,
1675,
395,
1419,
907,
1931,
75,
1099,
587,
1611,
331,
1355,
843,
1867,
203,
1227,
715,
1739,
459,
1483,
971,
1995,
43,
1067,
555,
1579,
299,
1323,
811,
1835,
171,
1195,
683,
1707,
427,
1451,
939,
1963,
107,
1131,
619,
1643,
363,
1387,
875,
1899,
235,
1259,
747,
1771,
491,
1515,
1003,
2027,
27,
1051,
539,
1563,
283,
1307,
795,
1819,
155,
1179,
667,
1691,
411,
1435,
923,
1947,
91,
1115,
603,
1627,
347,
1371,
859,
1883,
219,
1243,
731,
1755,
475,
1499,
987,
2011,
59,
1083,
571,
1595,
315,
1339,
827,
1851,
187,
1211,
699,
1723,
443,
1467,
955,
1979,
123,
1147,
635,
1659,
379,
1403,
891,
1915,
251,
1275,
763,
1787,
507,
1531,
1019,
2043,
7,
1031,
519,
1543,
263,
1287,
775,
1799,
135,
1159,
647,
1671,
391,
1415,
903,
1927,
71,
1095,
583,
1607,
327,
1351,
839,
1863,
199,
1223,
711,
1735,
455,
1479,
967,
1991,
39,
1063,
551,
1575,
295,
1319,
807,
1831,
167,
1191,
679,
1703,
423,
1447,
935,
1959,
103,
1127,
615,
1639,
359,
1383,
871,
1895,
231,
1255,
743,
1767,
487,
1511,
999,
2023,
23,
1047,
535,
1559,
279,
1303,
791,
1815,
151,
1175,
663,
1687,
407,
1431,
919,
1943,
87,
1111,
599,
1623,
343,
1367,
855,
1879,
215,
1239,
727,
1751,
471,
1495,
983,
2007,
55,
1079,
567,
1591,
311,
1335,
823,
1847,
183,
1207,
695,
1719,
439,
1463,
951,
1975,
119,
1143,
631,
1655,
375,
1399,
887,
1911,
247,
1271,
759,
1783,
503,
1527,
1015,
2039,
15,
1039,
527,
1551,
271,
1295,
783,
1807,
143,
1167,
655,
1679,
399,
1423,
911,
1935,
79,
1103,
591,
1615,
335,
1359,
847,
1871,
207,
1231,
719,
1743,
463,
1487,
975,
1999,
47,
1071,
559,
1583,
303,
1327,
815,
1839,
175,
1199,
687,
1711,
431,
1455,
943,
1967,
111,
1135,
623,
1647,
367,
1391,
879,
1903,
239,
1263,
751,
1775,
495,
1519,
1007,
2031,
31,
1055,
543,
1567,
287,
1311,
799,
1823,
159,
1183,
671,
1695,
415,
1439,
927,
1951,
95,
1119,
607,
1631,
351,
1375,
863,
1887,
223,
1247,
735,
1759,
479,
1503,
991,
2015,
63,
1087,
575,
1599,
319,
1343,
831,
1855,
191,
1215,
703,
1727,
447,
1471,
959,
1983,
127,
1151,
639,
1663,
383,
1407,
895,
1919,
255,
1279,
767,
1791,
511,
1535,
1023,
2047,
};
#endif
